package com.funtl.screw.admin.mapper;

import com.funtl.screw.admin.entity.SysDeptRelation;
import com.funtl.screw.common.data.permission.ServiceBaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Lusifer
 * @since 2018-02-12
 */
@Mapper
public interface SysDeptRelationMapper extends ServiceBaseMapper<SysDeptRelation> {

    /**
     * 删除部门 > 删除所有关联此部门子节点的闭包关系
     *
     * @param id 部门ID
     */
    void deleteDeptRelationsByDeptId(Long id);

    /**
     * 删除节点数据
     *
     * @param deptRelation 关系节点
     */
    void deleteDeptRelations(SysDeptRelation deptRelation);

    /**
     * 新增节点数据
     *
     * @param deptRelation 关系节点
     */
    void insertDeptRelations(SysDeptRelation deptRelation);

}
